Attribute VB_Name = "Module1"
Public a() As Double
Public B() As Double
Public coe() As Double
Public Erf As Boolean
Public coeficientes() As Double
Public xx() As Double
Public y() As Double
Public xl() As Double


Function Funcion(ByVal x As Double) As Double
    Erf = False
    On Error GoTo Er
    'Primera funcion del practico Funcion = (x ^ 5 - 1) * (Exp(1) ^ (x)) - 10
    'Segunda funcion del practico
    ' Funcion = Log(x) + 1 / x - 3
    'Funcion = 12 + (1.82 * x) + (0.13 * (x ^ 2)) - (0.02 * (x ^ 3))
    'Funcion = Log(1 + (x ^ 2))
    'Funcion = ((x ^ 4) / 12) - (3 * x)
    'Funcion = Exp(1) ^ (-(x ^ 2))
    'Funcion = (x ^ 2) - 4
    'Funcion = (x ^ 3) - (6 * (x ^ 2)) - (4 * x) + 2
    'Funcion = ((1 + Sin(x)) / x)
    'Tercera funcion del practico Funcion = (1 / 10) * (x - 3) ^ 1 / 5 + (1 / 24) * x ^ 2 - 4
    'Funcion = Log(1 + x ^ 2) - 5
    'Funcion = x ^ 2 - 5
    'Funcion = x ^ 3 + e ^ x + 0.6
    'Funcion = (1 / 10) * ((x - 3) ^ (1 / 3)) + (1 / 24) * x ^ 2 - 4
    'Funcion = Sin(x)
    'Funcion = Exp(1) ^ ((-x) ^ 2 + 0.51)
    'Funcion = (1 / x) * Sqr(x) - 2
    'Funcion = ((1 / 3 * (x ^ 2)) + x - 6) * ((Exp(1) ^ x) + 2) - (-(x ^ 2) - 3 * x + 20)
    'Funcion = (-(x ^ 2) - 3 * x + 20) - (((1 / 3 * (x ^ 2)) + x - 6) * ((Exp(1) ^ x) + 2))
    'Funcion = (3 * (x ^ 3)) - (x ^ 2) - (10 * x) - (-(x ^ 2) + (2 * x))
    'Funcion = (3 * (x ^ 3)) - (x ^ 2) - (10 * x)
    Funcion = (x ^ 3) / (Sqr((x ^ 2) + 9))
    
    Exit Function
Er:
    Funcion = 0
    Erf = True
End Function
Function FuncionG(x As Double) As Double
    'FuncionG = (-1.65 * x) + 34.35
    FuncionG = -(x ^ 2) + (2 * x)
End Function

